package com.allin.mall.user.controller;

import com.allin.mall.common.core.api.CommonResult;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RequestMapping("/healthy")
@RestController
public class HealthyController {

    @Value("${spring.application.name}")
    private String applicationName;

    @GetMapping
    public CommonResult<String> healthy() {
        return CommonResult.success(String.format("%s healthy", applicationName));
    }
}
